package net.peelmeagrape.hibernate;

import net.peelmeagrape.hibernate.xmlgen.AddPropertyNameAsAttribute;
import net.peelmeagrape.hibernate.xmlgen.XmlElement;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;

/**
 * Maps a property of the component class (see {@link Component})
 * as a reference back to the containing entity.
 */
@Target({METHOD,FIELD}) @Retention(RUNTIME)
@XmlElement(name="parent")
@AddPropertyNameAsAttribute(name="name")
public @interface Parent
{
}
